quartz: get the core pointer from the device manager
authorPaolo Borelli <pborelli@gnome.org>
Sun, 28 Feb 2016 14:11:45 +0000 (15:11 +0100)
committerPaolo Borelli <pborelli@gnome.org>
Mon, 29 Feb 2016 13:15:04 +0000 (14:15 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=762820

gdk/quartz/gdkdisplay-quartz.c

index 6b4afc87434fbaa554989250ca5add52f4a6d9d7..62e1d6595a3d0c9dd7a01a04b24808c4b9caadc9 100644 (file)
@@ -86,26 +86,10 @@ gdk_quartz_display_init_input (GdkDisplay *display)
 
   g_list_free (list);
 
-  /* Now set "core" pointer to the first master device that is a pointer. */
-  list = gdk_device_manager_list_devices (device_manager,
-                                          GDK_DEVICE_TYPE_MASTER);
-
-  for (l = list; l; l = l->next)
-    {
-      GdkDevice *device = l->data;
-
-      if (gdk_device_get_source (device) != GDK_SOURCE_MOUSE)
-        continue;
-
-      display->core_pointer = device;
-      break;
-    }
-
   /* Add the core pointer to the devices list */
+  display->core_pointer = GDK_QUARTZ_DEVICE_MANAGER_CORE (device_manager)->core_pointer;
   display_quartz->input_devices = g_list_prepend (display_quartz->input_devices,
                                                   g_object_ref (display->core_pointer));
-
-  g_list_free (list);
 }
 
 GdkDisplay *